<?php
// +----------------------------------------------------------------------
// | Iecms [ Make the most exquisite CMS ]
// +----------------------------------------------------------------------
// | Copyright (c) 2009~2019 http://www.iemoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: iemoo <i@iemoo.com>
// +----------------------------------------------------------------------
// | DateTime: 2019/11/19 11:08
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

/**
 * 验证器
 * @package app\admin\validate
 */
class Files extends Validate
{
    protected $rule = [
		'url'				=> 'require|max:200',
		'ext'				=> 'max:20',
		'size'				=> 'number|gt:0',
		'md5'				=> 'require|alphaNum|unique:files|length:32',
    ];

    protected $message = [
		'url.require'			=> '文件地址缺失',
		'url.max'				=> '文件地址过长',
		'ext.max'				=> '文件扩展名过长',
		'size.number'			=> '文件大小有误',
		
        'md5.require'			=> '缺少文件MD5值',
		'md5.alphaNum'			=> '文件MD5不正确',
        'md5.unique'			=> '文档MD5核验有重复',
		'md5.length'			=> '文件MD5必须为32位'
    ];
	

}